<script setup>
import { useRoute, useRouter } from 'vue-router'
import { computed } from 'vue'

const route = useRoute()
const router = useRouter()
const currentPath = computed(() => route.path)
</script>

<template>
  <el-container class="layout-container">
    <el-header class="header">
      <div class="logo">
        <h1>Web2Image</h1>
      </div>
      <div class="nav">
        <el-button text @click="router.push('/')">截图工具</el-button>
        <el-button text @click="router.push('/api')">API 文档</el-button>
      </div>
    </el-header>
    
    <el-main>
      <router-view />
    </el-main>
    
    <el-footer class="footer">
      <p>© 2024 Maxverse. All rights reserved.</p>
    </el-footer>
  </el-container>
</template>

<style scoped>
.layout-container {
  min-height: 100vh;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo h1 {
  margin: 0;
  font-size: 24px;
  color: #409EFF;
}

.nav {
  display: flex;
  gap: 20px;
}

.footer {
  text-align: center;
  color: #909399;
  padding: 20px 0;
}
</style>
